import request from '../utils/request'



export const getRoleList = () => {
    return request({
        url: '/role/list',
        method: 'GET',
    })
}


export const staffRole = (id) => {
    return request({
        url: `/user-manage/role/${id}`,
        method: 'GET',
    })
}


export const updateStaffRole = (id, roles) => {
    return request({
        url: `/user-manage/update-role/${id}`,
        method: 'POST',
        data: {
            roles
        }
    })
}



export const getPermission = (id) => {
    return request({
        url: `/role/permission/${id}`,
        method: 'GET',
    })
}


export const getPermissionList = () => {
    return request({
        url: '/permission/list',
        method: 'GET',
    })
}